package com.example.j2025_11_17.Controller;

import com.example.j2025_11_17.Model.UserInfo;
import com.example.j2025_11_17.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/User")
@RestController

public class UserController {
    @Autowired
    public UserService userService;

     @RequestMapping("/getAllUser")
    public List<UserInfo> getAllUser(){
        return userService.userService();
    }

    @RequestMapping("/getAllUser2")
    public UserInfo getAllUser2(){
        return userService.userService2();
    }

    @RequestMapping("/getAllUser3")
    public UserInfo getAllUser3(Integer id){
        return userService.userService3(id);
    }




}
